﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COFE.Core.Filter;
using COFE.Core.Profile;

namespace COFE.Core.Lister
{
    public interface IDirectoryLister2 : IDirectoryLister
    {
        /// <summary>
        /// If this interface is implemented, 
        /// this method will be used (if returned true)
        /// instead of IDirectoryLister.List() method.
        /// 
        /// Unlike List() method, ListAll() return also sub-entries, 
        /// as long as they match the filters.
        /// </summary>
        /// <typeparam name="T">Only entry that match the type T will be returned.</typeparam>
        /// <param name="parent"></param>
        /// <param name="entryFilters"></param>
        /// <param name="options"></param>
        /// <param name="flags"></param>
        /// <param name="output"></param>
        /// <returns></returns>
        bool ListAll<T>(IInternalDirectoryInfoExA parent,
            IEntryFilter[] entryFilters, IOptionFilter[] options, 
            EntryConstructionFlags flags, 
            out IEnumerable<T> output)
            where T : IFileSystemInfo;

    }
}
